<template>
	<div>
		<v-lunbo :bannerList="bList" :src='bSrc'></v-lunbo>
	</div>
</template>

<script>
	export default {
		created () {
			this.$api.get('/front/base/banners', null, r => {
				console.log('轮播图r', r)
				this.bannerList = r.data.list
			})
		},
		data() {
			return {
				bSrc: this.$src,
				bList: [1, 2, 3],
				swiperOption: {
					initialSlide: 0,
					pagination: {
						el: '.swiper-pagination',
					},
					loop: true,
					speed: 400,
					autoplay: {
						delay: 4500,
						disableOnInteraction: false,
					},
					observer: true, //修改swiper自己或子元素时，自动初始化swiper
					observeParents: true //修改swiper的父元素时，自动初始化swiper
				}
			}
		},
		methods: {
			onSlideChangeStart(currentPage) {
				console.log('onSlideChangeStart', currentPage);
			},
			onSlideChangeEnd(currentPage) {
				console.log('onSlideChangeEnd', currentPage);
			}
		}
	}
</script>